﻿using System;
using Plugins.Base.Historical;
using Plugins.UserControls;
using TrixPlugin.Common;
using Utils;

namespace TrixPlugin.Historical
{
	[Serializable]
	class HistoricalSettings : HistoricalSettingsBase, ICopyable<HistoricalSettings>, ICloneable<HistoricalSettings>
	{
		#region Properties

		public StrategyControlData StrategyControlData { get; private set; }

		#endregion

		#region Public Methods

		public HistoricalSettings(HourSelectorData hourSelectorData, StockSelectorData stockSelectorData, StockParametersSelectorData stockParametersSelectorData, DateSelectorData dateSelectorData, StrategyControlData strategyControlData) : base(hourSelectorData, stockSelectorData, stockParametersSelectorData, dateSelectorData)
		{
			this.StrategyControlData = strategyControlData;
		}

		#endregion

		#region ICopyable

		public void Copy(HistoricalSettings source)
		{
			this.StrategyControlData.Copy(source.StrategyControlData);
			base.Copy(source);
		}

		#endregion

		#region ICloneable

		public new HistoricalSettings Clone()
		{
			return new HistoricalSettings(base.HourOptions.Clone(), base.StockSelectionOptions.Clone(), base.StockParameters.Clone(), base.DateSettings.Clone(), this.StrategyControlData.Clone());
		}

		#endregion
	}
}
